package lab01;

import java.util.Random;
import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
        int i=new Random().nextInt(101);
        System.out.println(i);
        System.out.println("输入你的数：");
        int j= new Scanner(System.in).nextInt();
        while (i!=j){
            if(i>j){
                System.out.println("小了");
                j= new Scanner(System.in).nextInt();
            }else if(i<j){
                System.out.println("大了");
                j= new Scanner(System.in).nextInt();
            }
        }
        System.out.println("猜对了。");
    }
}
